package cas.ihep.pwa.fcn;

import cas.ihep.pwa.entity.ComputeResultMc;
import org.apache.spark.api.java.function.Function2;
import scala.Tuple2;

public class ReduceCRFcn implements Function2<Tuple2<Long,ComputeResultMc>,Tuple2<Long,ComputeResultMc>,Tuple2<Long,ComputeResultMc>>{
    @Override
    public Tuple2<Long, ComputeResultMc> call(Tuple2<Long, ComputeResultMc> v1, Tuple2<Long, ComputeResultMc> v2) {
        return new Tuple2<>(0L,v1._2().add(v2._2()));
    }
}
